package ccrClasses.layer1.procedures;

import java.util.ArrayList;
import java.util.List;

import ccrClasses.CCR;
import ccrClasses.ICcr;

public class Procedures extends CCR implements ICcr {
	
	public static final String OPEN_TAG = "<Procedures>";

	public static final String CLOSE_TAG = "</Procedures>";
	
	private List<Procedure> procedures;
	
	public Procedures(){
		super();
		setProcedures(new ArrayList<Procedure>());
	}


	@Override
	public String constructCcrString() {
		String ccr = BASE_OPEN_TAG + BODY_OPEN_TAG + OPEN_TAG;
		for(Procedure i: procedures){
			ccr = ccr + i.constructCcrString();
		}
		
		ccr = ccr + CLOSE_TAG + BODY_CLOSE_TAG + BASE_CLOSE_TAG;
		return ccr;
	}


	/**
	 * @param procedures the procedures to set
	 */
	public void setProcedures(List<Procedure> procedures) {
		this.procedures = procedures;
	}


	/**
	 * @return the procedures
	 */
	public List<Procedure> getProcedures() {
		return procedures;
	}

}
